package zhyh.kit.base;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.UUID;

public class Kit
{
	static Properties props = new Properties();

	static {
		InputStream is = null;
		try {
			is = Kit.class.getClassLoader().getResourceAsStream("common.properties");
			props.load(is);
		} catch (IOException e) {
		} finally {
			if (null != is)
				try {
					is.close();
				} catch (IOException e) {
				}
		}
	}

	public static String getRandomName() {
		return System.currentTimeMillis() + "_" + new Object().hashCode() + "_" + UUID.randomUUID().toString();
	}

	public static String getProp(String key) {
		return props.getProperty(key);
	}
}
